package jtk.project4.fleet.templateField;

import java.awt.Dimension;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.FormLayout.Resize;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;
import nl.coderight.jazz.form.field.NumberField;
import nl.coderight.jazz.form.field.SelectField;
import nl.coderight.jazz.form.field.TextField;

public class ContohComboDanSelectField extends GroupControl{
	private ComboField contohComboField ;
	private SelectField contohSelectField ;
	
	public ContohComboDanSelectField(String bindID){
		setTitle("header.contohSelectField");
		setBindID(bindID);
		createFields();
		createLayout();
	}

	private void createFields() {
		// TODO Auto-generated method stub
		//menentukan combo box
		
		contohComboField = new ComboField<String>("domains","domain");
		contohComboField.setPreferredSize(new Dimension(166, 20));
		contohComboField.insert("String1", true);
		contohComboField.insert("String2", true);
		contohComboField.insert("String3", true);
		
		contohSelectField = new SelectField<String>("domains","domain");
		contohSelectField.setPreferredSize(new Dimension(166, 20));
		contohSelectField.insert("String1", true);
		contohSelectField.insert("String2", true);
		contohSelectField.insert("String3", true);
	}
	
	private void createLayout() {
		// TODO Auto-generated method stub
		setLayout(new FormLayout())

		.addLabel("label.comboField")		.addField(contohComboField)
		.addRow()
		.addLabel("label.selectField")		.addField(contohSelectField) ;	
	}
}
